package com.design.interpreter;

/**
 * @author leali
 * @title: DistanceNode
 * @projectName design
 * @description: 距离解释：终结符表达式
 * @date 2022/1/3 18:20
 */
public class DistanceNode extends AbstractNode {
    private final String distance;

    public DistanceNode(String distance) {
        this.distance = distance;
    }

    @Override
    public String interpret() {
        return this.distance + "米\n";
    }
}
